/****************************************************
	文件：GoapActionLibrary.cs
	作者：林文豪
	日期：2021/03/28 17:36:59
	功能：Noting
*****************************************************/

using MyGame.AI.GOAP;
using System.Collections.Generic;
using UnityEngine;

namespace MyGame.Global {
    public static class GoapActionLibrary {
        private static Dictionary<GoapActionType, IAction> _ActionDic;

        static GoapActionLibrary() {
            _ActionDic = new Dictionary<GoapActionType, IAction>();
        }

        public static void GetGoapActionsFromFile() { }

        public static IAction GetAction(GoapActionType goapActionType) {
            if (_ActionDic[goapActionType] != null) {
                return _ActionDic[goapActionType];
            }
            else {
                Debug.LogError("尝试获取类型为【" + goapActionType.ToString() + "】的动作数据，但是Goap动作库中并没有此数据！");
                return null;
            }
        }
    }
}